from django.db import models

# Create your models here.


class Bbs(models.Model):
    """论坛表"""
    userId = models.IntegerField()
    type = models.IntegerField(verbose_name="发布的类型")
    title = models.CharField(max_length=20, verbose_name="标题")
    content = models.TextField(verbose_name="发布的内容")
    top = models.BooleanField(default=False, verbose_name="置顶")
    create_time = models.DateTimeField(auto_now_add=True)

class BbsType(models.Model):
    """论坛类型表"""
    BbsId = models.IntegerField(verbose_name="论坛id")
    name = models.CharField(max_length=20, verbose_name="发布的类型名称")


class BbsComment(models.Model):
    """论坛评论表"""
    userId = models.IntegerField(verbose_name="用户id")
    BbsId = models.IntegerField(verbose_name="论坛id")
    content = models.TextField(verbose_name="评论内容")
    create_time = models.DateTimeField(auto_now_add=True)

class CommentReply(models.Model):
    userID = models.IntegerField(verbose_name="用户id")
    commentId = models.IntegerField(verbose_name="评论表的id")
    content = models.TextField(verbose_name="回复内容")
    create_time = models.DateTimeField(auto_now_add=True)

